﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="KuaJing.Memberships"
				        namespace="KuaJing.Memberships.Domain">

  <class name="Membership" table="Membership_Membership"  lazy="false">
    <id name="Id" access="field.camelcase"
        column="MembershipId" type="Int32">
      <generator class="native" />
    </id>
    <version name="Version" access="field.camelcase" />
    <property name="Name" />

    <set name="Actors" table="Membership_Actor_Membership" cascade="all">
      <key column="MembershipId" foreign-key="fk_membership_actor"></key>
      <many-to-many class="KuaJing.Memberships.Domain.Actor,KuaJing.Memberships" column="ActorId"></many-to-many>
    </set>
    
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>